import {defineStore} from 'pinia'


const loginStore = defineStore("loginStore", {
    state: () => {
        return {
            // 登录前访问的路由，从这个路由跳转到了登录，登录成功后继续跳转到这个路由
            nextPath: null
        }
    },
    getters: {
        getNextPath(state) {
            return state.nextPath
        }
    },
    actions: {
        setNextPath(nextPath) {
            this.nextPath = nextPath
        }
    }
})

export default loginStore